package com.hxzy.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hxzy.mapper.AddressMapper;
import com.hxzy.pojo.Address;
import com.hxzy.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    @Override
    public List<Address> list(String username) {
        QueryWrapper<Address> wrapper = new QueryWrapper<>();
        wrapper.eq("username",username);
        List<Address> list = addressMapper.selectList(wrapper);
        return list;
    }
}
